import request from './request'

export const getSysUserList = (params) => {
  return request({
    url: '/api/user/list',
    method: 'get',
    params
  })
}

export const createSysUser = (data) => {
  return request({
    url: '/api/user/create',
    method: 'post',
    data
  })
}

export const updateSysUser = (data) => {
  return request({
    url: `/user/${data.id}`,
    method: 'put',
    data
  })
}

export const deleteSysUser = (id) => {
  return request({
    url: `/user/${id}`,
    method: 'delete'
  })
}

export const getSysUserDetail = (id) => {
  return request({
    url: `/user/${id}`,
    method: 'get'
  })
}